package com.morphiastic.tests.custommapers;

import com.google.code.morphia.annotations.Embedded;
import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.morphiastic.annotations.ElastiField;
import com.morphiastic.annotations.ElastiFieldBridge;
import com.morphiastic.annotations.ElastiFieldType;
import com.morphiastic.annotations.ElastiMorphed;
import com.vividsolutions.jts.geom.Point;

@Entity
@ElastiMorphed(typeName="poi")
public class POI {

	
	@Id
	private String name;

	@Embedded
	@ElastiField(elastiFieldType=ElastiFieldType.geo_point,
			fieldConverter=@ElastiFieldBridge(bridgeClass=PointFieldBridge.class))
	private Point location;
	
	
	public POI(){
	}
	
	public POI(String name, Point location) {
		super();
		this.name = name;
		this.location = location;
	}
	
	
	
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the location
	 */
	public Point getLocation() {
		return location;
	}
	/**
	 * @param location the location to set
	 */
	public void setLocation(Point location) {
		this.location = location;
	}
	
	
	
}
